import request from '@/config/axios'

// 客户组明细 VO
export interface CustomerSetGroupVO {
  id: number // 主键
  groupCode: string // 客户组编码
  customerCode: string // 客户编码
}

// 客户组明细 API
export const CustomerSetGroupApi = {
  // 查询客户组明细分页
  getCustomerSetGroupPage: async (params: any) => {
    return await request.get({ url: `/mdm/customer-set-group/page`, params })
  },

  // 查询客户组明细详情
  getCustomerSetGroup: async (id: number) => {
    return await request.get({ url: `/mdm/customer-set-group/get?id=` + id })
  },

  // 新增客户组明细
  createCustomerSetGroup: async (data: CustomerSetGroupVO) => {
    return await request.post({ url: `/mdm/customer-set-group/create`, data })
  },

  // 修改客户组明细
  updateCustomerSetGroup: async (data: CustomerSetGroupVO) => {
    return await request.put({ url: `/mdm/customer-set-group/update`, data })
  },

  // 删除客户组明细
  deleteCustomerSetGroup: async (id: number) => {
    return await request.delete({ url: `/mdm/customer-set-group/delete?id=` + id })
  },

  // 导出客户组明细 Excel
  exportCustomerSetGroup: async (params) => {
    return await request.download({ url: `/mdm/customer-set-group/export-excel`, params })
  },
}